package com.robot.admin.pojo.vo;

import java.math.BigDecimal;
import java.math.BigInteger;

/**
 * 中间表-代理商提现
 * select '2020-02-21'as "日期",agent.id as "代理商号",agent.province+agent.city+agent.area as "代理区域",agent.real_name as "代理商名称",count(orders.id) as "总单数",sum(orders.price)as "小票总额",sum(pay_amount)as "实付金额",sum(principal) as "本金",sum(agent_revenue)"代理商收益"
 * from orders.orders,company,agent.agent where orders.merchant_id=company.id and company.agent_id=agent.id  and
 * orders.created_at between (SELECT str_to_date(DATE_FORMAT('2020-02-21','%Y-%m-%d'),'%Y-%m-%d %H:%i:%s')) and (select DATE_ADD(DATE_ADD(str_to_date(DATE_FORMAT('2020-02-21','%Y-%m-%d'),'%Y-%m-%d %H:%i:%s'),INTERVAL 1 DAY),INTERVAL -1 SECOND)) group by agent.id
 *
 * @author lin
 */
public class CashWithdrawal {
    private String date;
    /**
     * 代理商号
     */
    private String agentId;

    /**
     * 代理区域
     */
    private String agentArea;

    /**
     * 代理商名称
     */
    private String agentName;
    /**
     * 总单数
     */
    private BigInteger totalOrders;
    /**
     * 小票总额
     */
    private BigDecimal totalPrice;
    /**
     * 会员实付金额=实付金额
     */
    private BigDecimal totalPayAmount;
    /**
     * 本金
     */
    private BigDecimal totalPrincipal;
    /**
     * 代理商收益
     */
    private BigDecimal totalAgentRevenue;
    private String status;

    public CashWithdrawal() {
    }

    public CashWithdrawal(String date, String agentId, String agentArea, String agentName, BigInteger totalOrders, BigDecimal totalPrice, BigDecimal totalPayAmount, BigDecimal totalPrincipal, BigDecimal totalAgentRevenue, String status) {
        this.date = date;
        this.agentId = agentId;
        this.agentArea = agentArea;
        this.agentName = agentName;
        this.totalOrders = totalOrders;
        this.totalPrice = totalPrice;
        this.totalPayAmount = totalPayAmount;
        this.totalPrincipal = totalPrincipal;
        this.totalAgentRevenue = totalAgentRevenue;
        this.status = status;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getAgentId() {
        return agentId;
    }

    public void setAgentId(String agentId) {
        this.agentId = agentId;
    }

    public String getAgentArea() {
        return agentArea;
    }

    public void setAgentArea(String agentArea) {
        this.agentArea = agentArea;
    }

    public String getAgentName() {
        return agentName;
    }

    public void setAgentName(String agentName) {
        this.agentName = agentName;
    }

    public BigInteger getTotalOrders() {
        return totalOrders;
    }

    public void setTotalOrders(BigInteger totalOrders) {
        this.totalOrders = totalOrders;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getTotalPayAmount() {
        return totalPayAmount;
    }

    public void setTotalPayAmount(BigDecimal totalPayAmount) {
        this.totalPayAmount = totalPayAmount;
    }

    public BigDecimal getTotalPrincipal() {
        return totalPrincipal;
    }

    public void setTotalPrincipal(BigDecimal totalPrincipal) {
        this.totalPrincipal = totalPrincipal;
    }

    public BigDecimal getTotalAgentRevenue() {
        return totalAgentRevenue;
    }

    public void setTotalAgentRevenue(BigDecimal totalAgentRevenue) {
        this.totalAgentRevenue = totalAgentRevenue;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
